package dome;

public class CD extends Item {
    //    private String title;
    private String artist;
    private int numOfTracks;
    private int duration;
    private boolean gotIt;
    private String comment;

    // Code - Generate - Constructor 自动生产构造器
    public CD(String title, String artist, int numOfTracks, int duration, boolean gotIt, String comment) {
        super(title); // 相当于给父类进行初始化，以便子类继承使用父类的成员变量
        this.artist = artist;
        this.numOfTracks = numOfTracks;
        this.duration = duration;
        this.gotIt = gotIt;
        this.comment = comment;
    }
}
